package com.huawei.appmarket.framework;

import android.annotation.TargetApi;
import android.app.ActionBar;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import com.huawei.appgallery.assistantdock.base.externalaction.openviewaction.RemoteBuoyAction;
import com.huawei.appgallery.foundation.card.gamereserve.bean.OrderAppCardBean;
import com.huawei.appgallery.foundation.service.common.protocol.AppDetailActivityProtocol;
import com.huawei.appgallery.foundation.service.common.protocol.AppListFragmentProtocol;
import com.huawei.appgallery.foundation.service.common.protocol.request.AppListFragmentRequest;
import com.huawei.appgallery.foundation.store.bean.detail.DetailResponse;
import com.huawei.appgallery.foundation.ui.css.CSSDeclaration;
import com.huawei.appgallery.foundation.ui.css.CSSRule;
import com.huawei.appgallery.foundation.ui.css.CSSSelector;
import com.huawei.appgallery.foundation.ui.css.CSSStyleSheet;
import com.huawei.appgallery.foundation.ui.css.CSSView;
import com.huawei.appgallery.foundation.ui.css.adapter.CSSPropertyName;
import com.huawei.appgallery.foundation.ui.css.adapter.type.CSSMonoColor;
import com.huawei.appgallery.foundation.ui.framework.activity.AbstractBaseActivity;
import com.huawei.appgallery.foundation.ui.framework.activity.BaseActivity;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseCardBean;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseDetailResponse.Layout;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseDetailResponse.ShareInfo;
import com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment;
import com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment.e;
import com.huawei.appgallery.foundation.ui.framework.cardframe.widget.FilterDataLayout;
import com.huawei.appgallery.foundation.ui.framework.titleframe.bean.BaseTitleBean;
import com.huawei.appgallery.foundation.ui.framework.titleframe.bean.SpinnerItem;
import com.huawei.appgallery.foundation.ui.framework.uikit.ContractFragment;
import com.huawei.appgallery.share.api.ShareBean;
import com.huawei.appmarket.framework.fragment.HasTitleLoadingFragment;
import com.huawei.appmarket.framework.fragment.SecondaryListFragmentProtocol;
import com.huawei.appmarket.framework.fragment.request.SecondaryListFragmentRequest;
import com.huawei.appmarket.framework.titleframe.title.BackSearchbtnTitle;
import com.huawei.appmarket.framework.titleframe.title.BackTitle;
import com.huawei.appmarket.framework.widget.CustomActionBar;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailColumnTabBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailHeadBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailHeadBean.AppInfoLabel;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailHiddenBean;
import com.huawei.appmarket.service.appdetail.view.AppDetailFragmentProtocol;
import com.huawei.appmarket.service.appdetail.view.AppDetailFragmentProtocol.Request;
import com.huawei.appmarket.service.appdetail.view.AppNoContentFragmentProtocol;
import com.huawei.appmarket.service.appdetail.view.fragment.AppDetailFragment;
import com.huawei.secure.android.common.intent.SafeBroadcastReceiver;
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import o.ayw;
import o.bzh;
import o.AccountBussinessListener;
import o.ccp;
import o.ceh;
import o.PermissionChecker;
import o.cfv;
import o.cgv;
import o.cia;
import o.cin;
import o.cir;
import o.cjf;
import o.cjk;
import o.cjm;
import o.cjo;
import o.cvt;
import o.cwv;
import o.cww;
import o.dgh;
import o.dgm;
import o.dhr;
import o.djb;
import o.dje;
import o.djf;
import o.djm;
import o.djt;
import o.Logger;
import o.dof;
import o.doo;
import o.ContentManager;
import o.drr;
import o.drt;
import o.dss;
import o.dwc;
import o.ean;
import o.InteractiveRecommListener;
import o.ebd;
import o.ebf;
import o.ebg;
import o.ebi;
import o.InteractiveRecommListenerImpl;
import o.eel;
import o.efb;
import o.eib;
import o.eka;
import o.eoj;
import o.epv;
import o.epw;
import o.CollectCheck;
import o.eqp;
import o.erq;
import o.erx;
import o.ery;
import o.esp;
import o.est;
import o.ActivityUtil;
import o.evd;
import o.evg;
import o.evk;
import o.evr;
import o.ewm;
import o.ewm.h;
import o.ewm.j;
import o.ewm.n;
import o.fho;
import o.FragmentTransaction;
import o.ll;

public class AppDetailActivity<T extends AppDetailActivityProtocol> extends BaseActivity<T> implements e, ceh, dhr, djt, djb, com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.BaseListFragment.c, dje, ebf, ebd, InteractiveRecommListener, AccountBussinessListener {
    private int ʻॱ = 0;
    private int ʽॱ = 1;
    private long ʾ;
    private long ʿ;
    private long ˈ;
    private String ˉ = null;
    private boolean ˊˊ = false;
    private String ˊˋ = null;
    private String ˊॱ;
    private String ˊᐝ = null;
    private String ˋˊ = null;
    private int ˋˋ = 0;
    c ˋॱ = new c();
    private cjf ˋᐝ;
    private ShareInfo ˌ;
    private String ˍ;
    private boolean ˎˎ = true;
    private b ˎˏ;
    private int ˏˎ = 1;
    private boolean ˏˏ = false;
    private CustomActionBar ˏॱ;
    private Map<Integer, cia> ˑ = new HashMap();
    private LinearLayout ͺ;
    private ProgressDialog ͺॱ;
    private int ـ = 0;
    private int ॱʻ = -1;
    private bzh ॱʼ;
    private String ॱʽ;
    private ActionBar ॱˊ;
    private String ॱˋ = "";
    private int ॱˎ = 0;
    private boolean ॱͺ = false;
    private boolean ᐝˊ = false;
    private String ᐝˋ;
    private String ᐝॱ = "";
    private boolean ᐝᐝ = false;
    private int ᐧ = -1;
    private boolean ᐨ = false;
    private InteractiveRecommListenerImpl ㆍ;
    private boolean ꜞ = false;
    private Handler ꜟ = new Handler();

    class b extends SafeBroadcastReceiver {
        final /* synthetic */ AppDetailActivity ˊ;

        private b(AppDetailActivity appDetailActivity) {
            this.ˊ = appDetailActivity;
        }

        public void onReceiveMsg(Context context, Intent intent) {
            if (!eka.ˋ.equals(intent.getAction())) {
                return;
            }
            if (doo.ˊ(this.ˊ)) {
                this.ˊ.ˏˎ = intent.getIntExtra("translateFlag", 1);
                this.ˊ.ॱͺ();
                this.ˊ.ॱʼ();
                return;
            }
            evk.ˏ(this.ˊ.getString(n.ʹˊ));
        }
    }

    class c {
        final /* synthetic */ AppDetailActivity ˋ;

        private c(AppDetailActivity appDetailActivity) {
            this.ˋ = appDetailActivity;
        }

        private boolean ˋ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return (appDetailActivityProtocol == null || appDetailActivityProtocol.ॱ() == null) ? false : true;
        }

        private boolean ˏ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ʽ();
        }

        private String ˊ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ॱ();
        }

        private String ˎ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ᐝ();
        }

        private String ʻ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ˎ();
        }

        private boolean ʼ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ॱॱ();
        }

        private String ॱॱ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ʻ();
        }

        private boolean ʽ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ˋ();
        }

        private String ᐝ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ˏ();
        }

        private String ˏॱ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ʼ();
        }

        private String ॱˊ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ˊ();
        }

        public String ॱ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ˏॱ();
        }

        private String ͺ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ॱˊ();
        }

        private boolean ˊॱ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ˊॱ();
        }

        private String ˋॱ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ͺ();
        }

        private String ॱᐝ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ॱᐝ();
        }

        private String ॱˎ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ᐝॱ();
        }

        private String ॱˋ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ॱˎ();
        }

        private int ᐝॱ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ʾ();
        }

        private String ʻॱ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ʿ();
        }

        private String ʽॱ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ˈ();
        }

        private String ʾ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ʽॱ();
        }

        private int ʿ(AppDetailActivityProtocol appDetailActivityProtocol) {
            return appDetailActivityProtocol.ॱ().ʼॱ();
        }

        private ContractFragment ˏ(AppDetailActivity appDetailActivity, String str, com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment.b bVar, TaskFragment taskFragment, AppDetailActivityProtocol appDetailActivityProtocol) {
            DetailResponse detailResponse = (DetailResponse) bVar.ˋ;
            Logger.ˎ("AppDetailActivity", "res.getCss(): " + (detailResponse.ॱˎ() == null ? null : detailResponse.ॱˎ().toString()));
            switch (detailResponse.ॱॱ()) {
                case 1:
                case 2:
                    this.ˋ.ॱʻ = detailResponse.ˊॱ();
                    this.ˋ.ᐨ = detailResponse.ˋॱ() != null;
                    ˋ(this.ˋ.ॱˋ);
                    this.ˋ.ᐝᐝ = false;
                    this.ˋ.ͺ.removeAllViews();
                    this.ˋ.ͺ.setVisibility(8);
                    ContractFragment ˋ = ˋ(appDetailActivityProtocol, this.ˋ.ॱˋ, detailResponse);
                    if (ˋ.ˊ(cin.class) == null) {
                        return ˋ;
                    }
                    ((cin) ˋ).ॱ(bVar);
                    return ˋ;
                case 3:
                    return ˋ(appDetailActivity, taskFragment, bVar, detailResponse, appDetailActivityProtocol);
                case 8:
                    this.ˋ.ᐝᐝ = false;
                    return ˋ(taskFragment, bVar, detailResponse);
                default:
                    this.ˋ.ᐝᐝ = false;
                    Logger.e("AppDetailActivity", "Unsupported content type:" + detailResponse.ॱॱ());
                    return null;
            }
        }

        private ContractFragment ˋ(AppDetailActivity appDetailActivity, TaskFragment taskFragment, com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment.b bVar, DetailResponse<?> detailResponse, AppDetailActivityProtocol appDetailActivityProtocol) {
            this.ˋ.ॱˎ = 3;
            drr o_drr = new drr();
            drr.ˊ(o_drr, bVar.ˊ, bVar.ˋ);
            if (detailResponse.ॱ() == 0) {
                o_drr.ˏ(false);
            } else {
                o_drr.ˏ(true);
            }
            this.ˋ.ॱʻ = detailResponse.ˊॱ();
            ˋ();
            DetailResponse detailResponse2 = (DetailResponse) bVar.ˋ;
            DetailHeadBean ˋ = o_drr.ˋ();
            if (ˋ != null) {
                ˋ.ˏ(false);
                this.ˋ.ᐝˊ = ˋ.ˊॱ() == 15;
            }
            OrderAppCardBean ˎ = o_drr.ˎ();
            DetailHiddenBean ˋ2 = ˋ(o_drr, appDetailActivityProtocol, ˎ);
            if (this.ˋ.ˊ(o_drr, ˋ2)) {
                this.ˋ.ʻॱ = 1;
                this.ˋ.ॱʻ = 0;
                this.ˋ.ᐝᐝ = false;
                Logger.e("AppDetailActivity", "response error: headbean: " + ˋ + ",bottombean: " + ˋ2 + ",tabinfo: " + o_drr.ʽ());
                return null;
            }
            cjo appDetailFragmentProtocol = new AppDetailFragmentProtocol();
            Request request = new Request();
            request.ॱ(((cfv) bVar.ˊ).ˎ());
            request.ˏ(this.ˋ.ˋॱ.ॱ(appDetailActivityProtocol));
            request.ˎ(this.ˋ.ˋॱ.ͺ(appDetailActivityProtocol));
            request.ˊ(ˋ);
            request.ʻ(this.ˋ.ˍ);
            request.ˎ(this.ˋ.ـ);
            request.ॱ(false);
            ˊ(request, ˋ2);
            request.ˏ(ˎ);
            request.ˋ(o_drr.ʽ());
            ˋ(request, (DetailResponse) detailResponse, detailResponse2);
            request.ˏ(this.ˋ.ॱʻ);
            this.ˋ.ͺ.removeAllViews();
            BaseTitleBean baseTitleBean = new BaseTitleBean();
            baseTitleBean.ॱ(this.ˋ.ˋॱ.ॱ(appDetailActivityProtocol));
            ˋ(appDetailActivity, baseTitleBean);
            appDetailFragmentProtocol.ˋ(request);
            if (this.ˋ.ᐝᐝ) {
                if (this.ˋ.ـ() instanceof AppDetailFragment) {
                    drt o_drt = (drt) this.ˋ.ـ().ˊ(drt.class);
                    if (o_drt != null) {
                        o_drr.ˏ(request);
                        o_drt.ˋ(o_drr);
                        o_drt.ॱ(bVar);
                        this.ˋ.ॱ(true);
                        o_drt.ˎ(o_drr);
                    }
                }
                return null;
            }
            ContractFragment contractFragment = (ContractFragment) cjk.ˎ().ˊ(new cjm("appdetail.fragment", appDetailFragmentProtocol));
            drt o_drt2 = (drt) contractFragment.ˊ(drt.class);
            if (o_drt2 == null) {
                return contractFragment;
            }
            o_drt2.ˋ(o_drr);
            o_drt2.ॱ(bVar);
            return contractFragment;
        }

        private ContractFragment ˋ(AppDetailActivityProtocol appDetailActivityProtocol, String str, DetailResponse<?> detailResponse) {
            boolean z = true;
            SecondaryListFragmentRequest secondaryListFragmentRequest = new SecondaryListFragmentRequest();
            secondaryListFragmentRequest.ˏ(this.ˋ.ˊ(appDetailActivityProtocol));
            secondaryListFragmentRequest.ˋ(str);
            secondaryListFragmentRequest.ˊ(this.ˋ.ᐝॱ);
            secondaryListFragmentRequest.ˎ(true);
            secondaryListFragmentRequest.ॱ(1);
            secondaryListFragmentRequest.ˊ(detailResponse.ʼॱ());
            secondaryListFragmentRequest.ॱॱ(detailResponse.ˋ());
            secondaryListFragmentRequest.ͺ(detailResponse.ˉ());
            secondaryListFragmentRequest.ˎ(detailResponse.ˊˋ());
            secondaryListFragmentRequest.ˋ(detailResponse.ˊˊ());
            secondaryListFragmentRequest.ॱ(true);
            if (this.ˋ.ˎˎ) {
                z = false;
            }
            secondaryListFragmentRequest.ʻ(z);
            secondaryListFragmentRequest.ॱ(detailResponse.ॱˋ());
            secondaryListFragmentRequest.ˋॱ(detailResponse.ॱˊ());
            secondaryListFragmentRequest.ˏ(detailResponse.ˋॱ());
            secondaryListFragmentRequest.ˏ(detailResponse.ˊॱ());
            String ˎ = this.ˋ.ˊ((DetailResponse) detailResponse);
            if (!(detailResponse.ॱˎ() == null || ˎ == null)) {
                secondaryListFragmentRequest.ᐝ(detailResponse.ॱˎ().toString());
                secondaryListFragmentRequest.ʼ(ˎ);
                if (this.ˋ.ˏॱ != null) {
                    this.ˋ.ˏॱ.setCss(detailResponse.ॱˎ().toString());
                    this.ˋ.ˏॱ.setCssSelector(ˎ);
                }
            }
            cjo secondaryListFragmentProtocol = new SecondaryListFragmentProtocol();
            secondaryListFragmentProtocol.ˏ(secondaryListFragmentRequest);
            cjm o_cjm = new cjm("secondary.applist.fragment", secondaryListFragmentProtocol);
            if (str != null) {
                if (str.startsWith("widesubstancedetail")) {
                    o_cjm = new cjm("wide.substance.fragment", secondaryListFragmentProtocol);
                } else if (str.startsWith("substancedetail")) {
                    o_cjm = new cjm("substance.detail.fragment", secondaryListFragmentProtocol);
                } else if (ˏ(str)) {
                    o_cjm = new cjm("store.gift.list.fragment", secondaryListFragmentProtocol);
                }
            }
            return (ContractFragment) cjk.ˎ().ˊ(o_cjm);
        }

        private boolean ˏ(@NonNull String str) {
            boolean z = false;
            if (str.toLowerCase(Locale.US).startsWith("searchcontent")) {
                try {
                    z = "42".equals(Uri.parse(str).getQueryParameter("contentType"));
                } catch (Exception e) {
                    Logger.e("AppDetailActivity", "parserUrlParam exception: " + e.getMessage());
                }
            }
            return z;
        }

        private ContractFragment ˋ(TaskFragment taskFragment, com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment.b bVar, DetailResponse<?> detailResponse) {
            this.ˋ.ͺ.removeAllViews();
            this.ˋ.ͺ.setVisibility(8);
            ˋ(this.ˋ.ॱˋ);
            AppListFragmentRequest appListFragmentRequest = new AppListFragmentRequest();
            appListFragmentRequest.ˋ(this.ˋ.ॱˋ);
            appListFragmentRequest.ˊ(this.ˋ.ᐝॱ);
            appListFragmentRequest.ˎ(true);
            appListFragmentRequest.ॱ(8);
            appListFragmentRequest.ॱॱ(detailResponse.ˋ());
            appListFragmentRequest.ͺ(detailResponse.ˉ());
            appListFragmentRequest.ˎ(detailResponse.ˊˋ());
            appListFragmentRequest.ˋ(detailResponse.ˊˊ());
            appListFragmentRequest.ॱ(true);
            appListFragmentRequest.ʻ(!this.ˋ.ˎˎ);
            appListFragmentRequest.ॱ(detailResponse.ॱˋ());
            appListFragmentRequest.ˊ(true);
            cjo appListFragmentProtocol = new AppListFragmentProtocol();
            appListFragmentProtocol.ˏ(appListFragmentRequest);
            return (ContractFragment) cjk.ˎ().ˊ(new cjm("infoflow.fragment", appListFragmentProtocol));
        }

        private void ˋ(String str) {
            if (!(str == null || str.contains("substancedetail") || !epw.ˏ())) {
                this.ˋ.ॱʻ = 0;
            }
            this.ˋ.ˎˎ = false;
            if (this.ˋ.ॱʻ == 1 || this.ˋ.ᐨ) {
                this.ˋ.ˎˎ = true;
            }
        }

        private void ˋ(AppDetailActivity appDetailActivity, BaseTitleBean baseTitleBean) {
            if (1 == this.ˋ.ॱʻ) {
                return;
            }
            if (this.ˋ.ॱˎ != 3 || this.ˋ.ʻॱ != 0) {
                if (this.ˋ.ʽॱ == 1) {
                    this.ˋ.ˋᐝ = new BackSearchbtnTitle(appDetailActivity, baseTitleBean);
                } else {
                    this.ˋ.ˋᐝ = new BackTitle(appDetailActivity, baseTitleBean);
                }
                this.ˋ.ˋᐝ.ॱ((djb) appDetailActivity);
                if (this.ˋ.ˋᐝ.ˋ() != null) {
                    this.ˋ.ͺ.setVisibility(0);
                    this.ˋ.ͺ.removeAllViews();
                    LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
                    layoutParams.gravity = 8388611;
                    this.ˋ.ͺ.addView(this.ˋ.ˋᐝ.ˋ(), layoutParams);
                }
            }
        }

        private DetailHiddenBean ˋ(drr o_drr, AppDetailActivityProtocol appDetailActivityProtocol, OrderAppCardBean orderAppCardBean) {
            DetailHiddenBean detailHiddenBean = new DetailHiddenBean();
            if (!ˊ(appDetailActivityProtocol).contains("orderappdetail") || orderAppCardBean == null) {
                return o_drr.ᐝ();
            }
            detailHiddenBean.ˏ(orderAppCardBean.ͺ());
            detailHiddenBean.ˉ(orderAppCardBean.ͺˏ());
            detailHiddenBean.ॱᐝ(orderAppCardBean.ˎˎ());
            detailHiddenBean.ˏˎ(orderAppCardBean.ॱـ());
            detailHiddenBean.ˋ(orderAppCardBean.v_());
            detailHiddenBean.ˋᐝ(orderAppCardBean.ॱˌ());
            detailHiddenBean.ʾ(orderAppCardBean.ʾॱ());
            detailHiddenBean.ˎˏ(orderAppCardBean.ʻᐝ());
            detailHiddenBean.ˋˋ(orderAppCardBean.ॱˉ());
            detailHiddenBean.ॱ(orderAppCardBean.ॱॱ());
            detailHiddenBean.ˏॱ(orderAppCardBean.ʾ());
            detailHiddenBean.ॱ(orderAppCardBean.ˉ());
            detailHiddenBean.ʻ(orderAppCardBean.ˌ());
            detailHiddenBean.ˎ(orderAppCardBean.ˏॱ());
            return detailHiddenBean;
        }

        private void ˋ() {
            if (epw.ˏ()) {
                this.ˋ.ॱʻ = 0;
            }
        }

        private void ˊ(Request request, DetailHiddenBean detailHiddenBean) {
            if (detailHiddenBean != null && request != null) {
                detailHiddenBean.ॱʽ(this.ˋ.ˉ);
                detailHiddenBean.ॱͺ(this.ˋ.ˊˋ);
                detailHiddenBean.ॱʼ(this.ˋ.ˋˊ);
                detailHiddenBean.ʻॱ(this.ˋ.ˊᐝ);
                request.ˋ(detailHiddenBean, dgm.ˎ(this.ˋ));
            }
        }

        private void ˋ(Request request, DetailResponse<?> detailResponse, DetailResponse detailResponse2) {
            if (request != null && detailResponse2 != null) {
                String ˎ = this.ˋ.ˊ(detailResponse2);
                if (detailResponse2.ॱˎ() != null && ˎ != null) {
                    request.ˋ(detailResponse.ॱˎ().toString());
                    request.ˊ(ˎ);
                    if (this.ˋ.ˏॱ != null) {
                        this.ˋ.ˏॱ.setCss(detailResponse.ॱˎ().toString());
                        this.ˋ.ˏॱ.setCssSelector(ˎ);
                    }
                }
            }
        }
    }

    class d implements Runnable {
        final /* synthetic */ AppDetailActivity ˏ;

        private d(AppDetailActivity appDetailActivity) {
            this.ˏ = appDetailActivity;
        }

        public void run() {
            this.ˏ.ॱͺ();
            this.ˏ.ॱʼ();
        }
    }

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        cgv.ˋ(this, o.ewm.c.ˎ, o.ewm.c.ॱˎ);
        getWindow().getDecorView().setBackgroundColor(getResources().getColor(o.ewm.c.ॱˎ));
        erx ˎ = ery.ˎ("permission.interrupter", this);
        if (ˎ == null || ˎ.needInterruption()) {
            PermissionChecker.ˎ(this, 14);
        }
        eib.ॱ((Context) this);
        setContentView(h.ˎ);
        this.ͺ = (LinearLayout) findViewById(j.ˇˊ);
        this.ॱˊ = getActionBar();
        this.ˏॱ = (CustomActionBar) findViewById(j.ˊˈ);
        this.ˏॱ.setActionbarClickListener(this);
        TaskFragment ـ = ـ();
        if (ـ instanceof HasTitleLoadingFragment) {
            Bundle bundle2 = new Bundle();
            bundle2.putString("loading_title", getString(n.ॱـ));
            ـ.ʼ(bundle2);
        }
        Object ab_ = ab_();
        if (ab_ instanceof Map) {
            this.ˑ = (Map) ab_;
        }
        if (this.ˋॱ.ˋ((AppDetailActivityProtocol) ʾ())) {
            if (bundle == null) {
                ˏ(false);
                this.ͺ.setVisibility(8);
                AppDetailActivityProtocol appDetailActivityProtocol = (AppDetailActivityProtocol) ʾ();
                String str = "";
                str = "";
                str = "";
                str = "";
                this.ˎˎ = this.ˋॱ.ˊॱ(appDetailActivityProtocol);
                this.ˊˊ = this.ˋॱ.ˏ(appDetailActivityProtocol);
                this.ॱˋ = this.ˋॱ.ˊ(appDetailActivityProtocol);
                this.ᐝॱ = this.ˋॱ.ʻ(appDetailActivityProtocol);
                this.ˉ = this.ˋॱ.ˎ(appDetailActivityProtocol);
                this.ˋˊ = this.ˋॱ.ॱˎ(appDetailActivityProtocol);
                this.ˊˋ = this.ˋॱ.ॱᐝ(appDetailActivityProtocol);
                this.ˊᐝ = this.ˋॱ.ॱˋ(appDetailActivityProtocol);
                this.ˍ = this.ˋॱ.ˋॱ(appDetailActivityProtocol);
                this.ـ = this.ˋॱ.ᐝॱ(appDetailActivityProtocol);
                str = this.ˋॱ.ʽॱ(appDetailActivityProtocol);
                String ˊॱ = this.ˋॱ.ʾ(appDetailActivityProtocol);
                String ͺ = this.ˋॱ.ʻॱ(appDetailActivityProtocol);
                boolean ॱˊ = this.ˋॱ.ʼ(appDetailActivityProtocol);
                String ॱᐝ = this.ˋॱ.ॱˊ(appDetailActivityProtocol);
                String ʻॱ = this.ˋॱ.ॱॱ(appDetailActivityProtocol);
                boolean ᐝॱ = this.ˋॱ.ʽ(appDetailActivityProtocol);
                efb.ˎ(ॱˊ, ʻॱ, getApplicationContext());
                String ॱˎ = this.ˋॱ.ˏॱ(appDetailActivityProtocol);
                ʻॱ = this.ˋॱ.ᐝ(appDetailActivityProtocol);
                if (!TextUtils.isEmpty(ʻॱ)) {
                    dgh.onEvent(new o.dge.d((Context) this, ʻॱ).ˏ(ॱˎ).ˋ());
                }
                this.ᐝॱ = dof.ʼ(this.ᐝॱ);
                if (this.ॱˋ != null) {
                    this.ᐝᐝ = ॱ(ͺ, str);
                    if (!(appDetailActivityProtocol == null || this.ᐝᐝ)) {
                        ˍ();
                    }
                    if (ᐝॱ) {
                        dss.ॱ().ˊ((Context) this);
                        eel.ॱ(getApplicationContext());
                    }
                    ˎ(ॱᐝ);
                    if (this.ᐝᐝ) {
                        this.ॱʻ = this.ˋॱ.ʿ(appDetailActivityProtocol);
                        this.ॱˎ = 3;
                        DetailHeadBean detailHeadBean = new DetailHeadBean();
                        detailHeadBean.ˋ(ͺ);
                        detailHeadBean.ˎ(str);
                        detailHeadBean.ˎˎ(ˊॱ);
                        detailHeadBean.ˏ(true);
                        detailHeadBean.ˏ("  ");
                        List arrayList = new ArrayList();
                        AppInfoLabel appInfoLabel = new AppInfoLabel();
                        appInfoLabel.ˏ("  ");
                        arrayList.add(appInfoLabel);
                        appInfoLabel = new AppInfoLabel();
                        appInfoLabel.ˏ("  ");
                        arrayList.add(appInfoLabel);
                        detailHeadBean.ॱ(arrayList);
                        DetailHiddenBean detailHiddenBean = new DetailHiddenBean();
                        List arrayList2 = new ArrayList();
                        DetailColumnTabBean detailColumnTabBean = new DetailColumnTabBean();
                        detailColumnTabBean.ˋ(getResources().getString(n.ꓸॱ));
                        arrayList2.add(detailColumnTabBean);
                        detailColumnTabBean = new DetailColumnTabBean();
                        detailColumnTabBean.ˋ(getResources().getString(n.ˎˎ));
                        arrayList2.add(detailColumnTabBean);
                        cjo appDetailFragmentProtocol = new AppDetailFragmentProtocol();
                        Request request = new Request();
                        request.ˏ(this.ˋॱ.ॱ(appDetailActivityProtocol));
                        request.ˎ(this.ˋॱ.ͺ(appDetailActivityProtocol));
                        request.ॱ(this.ˋॱ.ˊ(appDetailActivityProtocol));
                        request.ˊ(detailHeadBean);
                        request.ʻ(this.ˍ);
                        request.ˎ(this.ـ);
                        request.ॱ(true);
                        request.ˋ(arrayList2);
                        this.ˋॱ.ˊ(request, detailHiddenBean);
                        request.ˏ(this.ॱʻ);
                        this.ͺ.removeAllViews();
                        BaseTitleBean baseTitleBean = new BaseTitleBean();
                        baseTitleBean.ॱ(this.ˋॱ.ॱ(appDetailActivityProtocol));
                        this.ˋॱ.ˋ(this, baseTitleBean);
                        appDetailFragmentProtocol.ˋ(request);
                        str = "AppDetail";
                        ॱ(str, (ContractFragment) cjk.ˎ().ˊ(new cjm("appdetail.fragment", appDetailFragmentProtocol)));
                    }
                } else {
                    Logger.e("AppDetailActivity", "Cannot get URI from intent's param ");
                    finish();
                }
            } else {
                ˋ(bundle);
            }
            this.ᐝˋ = ˏˎ();
            eoj.ˋ().ˎ(this.ᐝˋ, this);
            evr.ˊ().ˋॱ();
            ˎˎ();
            this.ˏॱ.ˏ();
            return;
        }
        finish();
    }

    private void ˎ(String str) {
        if (!TextUtils.isEmpty(str)) {
            String str2 = this.ॱˋ;
            int indexOf = this.ॱˋ.indexOf(124);
            if (indexOf != -1) {
                str2 = str2.substring(indexOf + 1);
            }
            dwc.ॱ().ˊ(this, str, str2);
        }
    }

    private boolean ॱ(String str, String str2) {
        if (!this.ॱˋ.startsWith("app|") || TextUtils.isEmpty(str2) || TextUtils.isEmpty(str)) {
            return false;
        }
        return true;
    }

    private void ˏ(boolean z) {
        if (this.ॱˊ != null) {
            if (z) {
                this.ॱˊ.show();
            } else {
                this.ॱˊ.hide();
            }
        }
    }

    private void ˋ(Bundle bundle) {
        if (bundle != null) {
            this.ॱʻ = bundle.getInt("AppDetailActivity.isimmer", -1);
            this.ʻॱ = bundle.getInt("AppDetailActivity.isNoContent");
            this.ˊˊ = bundle.getBoolean("AppDetailActivity.isThird");
            this.ˉ = bundle.getString("AppDetailActivity.accessId");
            this.ˍ = bundle.getString("AppDetailActivity.channelNo");
            this.ॱˎ = bundle.getInt("AppDetailActivity.contenttype");
            this.ʽॱ = bundle.getInt("AppDetailActivity.supportSearch");
            this.ˌ = (ShareInfo) bundle.getSerializable("AppDetailActivity.shareInfo");
            this.ˎˎ = bundle.getBoolean("AppDetailActivity.isHasTitle");
            this.ˋˋ = bundle.getInt("AppDetailActivity.bgcolor", 0);
            this.ॱˋ = bundle.getString("AppDetailActivity.detailId");
            this.ᐝॱ = bundle.getString("AppDetailActivity.traceId");
            this.ॱʼ = (bzh) bundle.getSerializable("AppDetailActivity.postMenuInfo");
            this.ॱʽ = bundle.getString("AppDetailActivity.postId");
            this.ᐨ = bundle.getBoolean("AppDetailActivity.isSecondaryList");
            this.ᐝᐝ = bundle.getBoolean("AppDetailActivity.isOptimizedLoading");
            ॱʽ();
            ˌ();
            this.ˏॱ.setBgColor(this.ˋˋ);
            if (this.ॱʻ == 1) {
                this.ˏॱ.setImmerStyle(true);
            } else {
                this.ˏॱ.setImmerStyle(false);
            }
            if (this.ʻॱ == 1) {
                ॱ("AppDetail", null);
            }
            this.ˊॱ = bundle.getString("interrequestkey", "");
        }
    }

    private void ˊᐝ() {
        this.ˎˏ = new b();
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction(eka.ˋ);
        ll.ˏ(ContentManager.getInstant().getContext()).ˏ(this.ˎˏ, intentFilter);
    }

    public void onSaveInstanceState(Bundle bundle) {
        bundle.putInt("AppDetailActivity.isNoContent", this.ʻॱ);
        bundle.putBoolean("AppDetailActivity.isThird", this.ˊˊ);
        bundle.putInt("AppDetailActivity.contenttype", this.ॱˎ);
        bundle.putInt("AppDetailActivity.isimmer", this.ॱʻ);
        bundle.putString("AppDetailActivity.accessId", this.ˉ);
        bundle.putString("AppDetailActivity.channelNo", this.ˍ);
        bundle.putInt("AppDetailActivity.supportSearch", this.ʽॱ);
        bundle.putSerializable("AppDetailActivity.shareInfo", this.ˌ);
        bundle.putBoolean("AppDetailActivity.isHasTitle", this.ˎˎ);
        bundle.putInt("AppDetailActivity.bgcolor", this.ˋˋ);
        bundle.putString("AppDetailActivity.detailId", this.ॱˋ);
        bundle.putString("AppDetailActivity.traceId", this.ᐝॱ);
        bundle.putSerializable("AppDetailActivity.postMenuInfo", this.ॱʼ);
        bundle.putString("AppDetailActivity.postId", this.ॱʽ);
        bundle.putString("interrequestkey", this.ˊॱ);
        bundle.putBoolean("AppDetailActivity.isSecondaryList", this.ᐨ);
        bundle.putBoolean("AppDetailActivity.isOptimizedLoading", this.ᐝᐝ);
        super.onSaveInstanceState(bundle);
        this.ˏˏ = true;
    }

    public String ʿ() {
        return this.ॱˋ;
    }

    private void ˌ() {
        if (this.ॱʻ != 1 && this.ˎˎ && (this.ॱˎ != 3 || this.ʻॱ == 1)) {
            BaseTitleBean baseTitleBean = new BaseTitleBean();
            baseTitleBean.ॱ(getString(n.ˋߴ));
            if (this.ʽॱ == 1) {
                this.ˋᐝ = new BackSearchbtnTitle(this, baseTitleBean);
            } else {
                this.ˋᐝ = new BackTitle(this, baseTitleBean);
            }
            this.ˋᐝ.ॱ((djb) this);
            if (this.ˋᐝ.ˋ() != null) {
                this.ͺ.setVisibility(0);
                this.ͺ.addView(this.ˋᐝ.ˋ());
            }
        }
        ˊ(this.ˎˎ);
    }

    private void ˏ(int i) {
        switch (i) {
            case -1:
                if (this.ॱˊ != null) {
                    this.ॱˊ.hide();
                }
                this.ͺ.setVisibility(8);
                return;
            case 1:
                evd.ˏ(getWindow());
                ayw.ˏ(this, 16908290, null, false);
                if (this.ॱˊ != null) {
                    this.ॱˊ.hide();
                }
                this.ͺ.setVisibility(8);
                this.ˏॱ.setVisibility(0);
                return;
            default:
                if ((this.ॱˎ == 3 && this.ʻॱ == 0) || this.ᐨ) {
                    ˋˋ();
                    if (this.ॱˊ != null) {
                        this.ॱˊ.hide();
                    }
                    this.ͺ.setVisibility(8);
                    this.ˏॱ.setVisibility(0);
                    return;
                }
                return;
        }
    }

    private void ˋˋ() {
        evd.ˏ(getWindow());
        ayw.ˏ(this, 16908290, null, false);
        View findViewById = getWindow().getDecorView().findViewById(16908335);
        if (findViewById != null) {
            findViewById.setVisibility(8);
        }
    }

    private void ˊ(boolean z) {
        if (z) {
            ˏ(this.ॱʻ);
            return;
        }
        this.ˏॱ.setVisibility(8);
        this.ͺ.setVisibility(8);
    }

    public void onDestroy() {
        super.onDestroy();
        if (!TextUtils.isEmpty(this.ᐝˋ)) {
            eoj.ˋ().ˊ(this.ᐝˋ);
        }
        cwv.ॱ().ˎ(null);
        if (this.ˏॱ != null) {
            this.ˏॱ.ˎ();
        }
        if (this.ͺॱ != null) {
            this.ͺॱ = null;
        }
    }

    public void ˎ(TaskFragment taskFragment, List<cvt> list) {
        cfv ᐝ = ᐝ();
        ᐝ.ˋ(this.ˏˎ);
        if (!TextUtils.isEmpty(this.ˍ)) {
            ᐝ.ʻ(this.ˍ);
        }
        if (!dof.ˋ(this.ˉ)) {
            ᐝ.ʼ(this.ˉ);
        }
        ᐝ.ʽ(FilterDataLayout.ˏ());
        this.ˈ = System.currentTimeMillis();
        list.add(ᐝ);
    }

    protected cfv ᐝ() {
        return cfv.ˎ(this.ˋॱ.ˊ((AppDetailActivityProtocol) ʾ()), this.ˋॱ.ʻ((AppDetailActivityProtocol) ʾ()), dgm.ˎ((Activity) this), 1);
    }

    public boolean ˋ(TaskFragment taskFragment, com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment.b bVar) {
        if (this.ͺॱ != null && this.ͺॱ.isShowing()) {
            this.ͺॱ.dismiss();
            if (bVar.ˋ.getResponseCode() != 0) {
                evk.ˏ(getString(n.ॱˉ));
            }
        }
        if (!ActivityUtil.isAcitivtyNotValid(this)) {
            this.ʿ = System.currentTimeMillis();
            ͺ();
            if (bVar.ˋ.getResponseCode() != 0) {
                ˏ(taskFragment, bVar);
            } else {
                if (taskFragment instanceof djm) {
                    ((djm) taskFragment).ˋ(8);
                }
                if (bVar.ˋ instanceof DetailResponse) {
                    DetailResponse detailResponse = (DetailResponse) bVar.ˋ;
                    this.ʽॱ = detailResponse.ʾ();
                    this.ˌ = detailResponse.ˊˊ();
                    this.ॱʽ = detailResponse.ˏॱ();
                }
                String str = "AppDetail";
                AppDetailActivityProtocol appDetailActivityProtocol = (AppDetailActivityProtocol) ʾ();
                Fragment fragment = null;
                if (appDetailActivityProtocol != null) {
                    fragment = this.ˋॱ.ˏ(this, str, bVar, taskFragment, appDetailActivityProtocol);
                }
                ˊ(this.ˎˎ);
                ˎˎ();
                ॱʽ();
                if (!this.ᐝᐝ) {
                    ॱ(str, fragment);
                }
            }
        }
        return false;
    }

    protected void ͺ() {
        long j = this.ʿ - this.ˈ;
        if (j > 0) {
            try {
                esp.ˎ(String.valueOf(j));
            } catch (NumberFormatException e) {
                Logger.e("AppDetailActivity", "cast string error!");
            }
        }
    }

    private void ˏ(TaskFragment taskFragment, com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment.b bVar) {
        if (this.ᐝᐝ) {
            this.ˏॱ.setVisibility(8);
            this.ॱʻ = -1;
            ˍ();
            ˋᐝ();
            this.ᐝᐝ = false;
        }
        if (taskFragment != null) {
            cir o_cir = (cir) taskFragment.ˊ(cir.class);
            if (o_cir != null) {
                o_cir.ॱ(bVar.ˋ.getResponseCode(), true);
            }
        }
        if (taskFragment instanceof HasTitleLoadingFragment) {
            ((HasTitleLoadingFragment) taskFragment).ˎ(getString(n.ॱـ));
        }
    }

    private void ˍ() {
        Fragment ˊ = cjk.ˎ().ˊ(new cjm("loading_with_title.fragment", null));
        Bundle bundle = new Bundle();
        bundle.putString("loading_title", "  ");
        if (ˊ instanceof TaskFragment) {
            TaskFragment taskFragment = (TaskFragment) ˊ;
            taskFragment.ʼ(bundle);
            taskFragment.ˋ(ˏॱ(), j.ˋˊ, "TaskFragment");
        }
    }

    private void ˎˎ() {
        boolean z = true;
        if (dof.ˋ(this.ॱʽ) || !this.ˎˎ) {
            ͺॱ();
            ˑ();
            return;
        }
        boolean z2 = this.ˌ != null;
        if (this.ʽॱ != 1) {
            z = false;
        }
        this.ˏॱ.setForumDataListener(this);
        this.ˏॱ.ॱ(this.ॱʽ, z2, z);
    }

    private void ॱ(String str, Fragment fragment) {
        if (fragment == null) {
            String ˊ;
            int i;
            this.ʻॱ = 1;
            if (this.ॱˊ != null) {
                if (this.ˊˊ) {
                    this.ॱˊ.hide();
                    this.ͺ.setVisibility(8);
                } else {
                    ˏˏ();
                }
            }
            this.ˏॱ.setVisibility(8);
            ˋᐝ();
            AppDetailActivityProtocol appDetailActivityProtocol = (AppDetailActivityProtocol) ʾ();
            AppNoContentFragmentProtocol.Request request = new AppNoContentFragmentProtocol.Request();
            if (appDetailActivityProtocol != null) {
                ˊ = ˊ(appDetailActivityProtocol);
            } else {
                ˊ = null;
            }
            request.ˎ(this.ˊˊ);
            String string = getString(n.ﹳॱ);
            int i2 = ewm.e.ᐝˊ;
            if (this.ॱˎ == 3) {
                string = getString(n.ⁱ);
            }
            if (dof.ॱ(ˊ)) {
                ˊ = string;
            }
            if (this.ॱˋ == null || !this.ॱˋ.contains("substancedetail")) {
                string = ˊ;
                i = i2;
            } else {
                string = getString(n.ॱˍ);
                i = ewm.e.ˍ;
            }
            request.ॱ(i);
            request.ˊ(string);
            cjo appNoContentFragmentProtocol = new AppNoContentFragmentProtocol();
            appNoContentFragmentProtocol.ˋ(request);
            fragment = cjk.ˎ().ˊ(new cjm("appnocontent.fragment", appNoContentFragmentProtocol));
        }
        ॱ(!this.ᐝᐝ);
        try {
            FragmentTransaction ˊ2 = ˏॱ().ˊ();
            ˊ2.ˏ(j.ˋˊ, fragment, str);
            ˊ2.ˋ();
        } catch (ArrayIndexOutOfBoundsException e) {
            Logger.ˋ("AppDetailActivity", e.toString());
        }
    }

    private void ˋᐝ() {
        View decorView = getWindow().getDecorView();
        getWindow().clearFlags(WXMediaMessage.DESCRIPTION_LENGTH_LIMIT);
        decorView.setSystemUiVisibility(0);
        if (erq.ˏ(getResources().getColor(o.ewm.c.ॱˎ))) {
            evd.ˊ(getWindow(), 1);
        } else {
            evd.ˊ(getWindow(), 0);
        }
    }

    private void ॱ(boolean z) {
        if (z) {
            long currentTimeMillis = System.currentTimeMillis() - this.ʿ;
            if (currentTimeMillis > 0) {
                try {
                    esp.ˊ(String.valueOf(currentTimeMillis));
                } catch (NumberFormatException e) {
                    Logger.e("AppDetailActivity", "cast string error!");
                }
            }
        }
    }

    private void ˏˏ() {
        BaseTitleBean baseTitleBean = new BaseTitleBean();
        if (this.ॱˋ == null || !this.ॱˋ.contains("substancedetail")) {
            baseTitleBean.ॱ(getString(n.ॱـ));
        } else {
            baseTitleBean.ॱ("  ");
            baseTitleBean.ॱ(0);
            this.ʽॱ = 0;
            this.ˌ = null;
        }
        this.ˋॱ.ˋ(this, baseTitleBean);
    }

    private void ˑ() {
        if (this.ˌ == null) {
            if (this.ˏॱ != null) {
                this.ˏॱ.setShareIconVisible(8);
            }
        } else if (this.ˏॱ != null && this.ˎˎ) {
            this.ˏॱ.setShareIconVisible(0);
        }
    }

    private void ͺॱ() {
        if (this.ʽॱ == 0 && this.ˏॱ != null) {
            this.ˏॱ.setSearchIconVisible(8);
        }
    }

    private void ˎˏ() {
        if (this.ˌ != null) {
            ShareBean shareBean = new ShareBean();
            shareBean.ॱ(this.ˌ.ˏ());
            shareBean.ˎ(this.ˌ.ˋ());
            shareBean.ˋ(this.ˌ.ˎ());
            shareBean.ˊ(getResources().getIdentifier(getString(n.ʼﾟ), "drawable", getPackageName()));
            String ˊ = this.ˌ.ˊ();
            String str = (ˊ == null || ˊ.contains("&V=")) ? ˊ : ˊ.contains("?") ? ˊ + "&V=90001000" : ˊ + "?&V=90001000";
            shareBean.ˊ(str);
            if (!eqp.ᐝ()) {
                shareBean.ˏ(2);
            }
            ((cww) fho.ˏ().ˋ("Share").ॱ(cww.class)).ˎ(this, shareBean);
            dgh.ˋ("340201", evg.ˏ(str, this.ॱˋ, String.valueOf(dgm.ˎ((Activity) this))));
        }
    }

    public void setTitle(CharSequence charSequence) {
        if (charSequence == null || charSequence.toString().trim().length() == 0) {
            charSequence = getString(n.ॱـ);
        }
        if (this.ˏॱ != null && (this.ॱʻ == 1 || this.ॱˎ == 3)) {
            this.ˏॱ.setTitle(charSequence);
        } else if (this.ˋᐝ != null) {
            BaseTitleBean ˎ = this.ˋᐝ.ˎ();
            ˎ.ॱ(charSequence.toString());
            this.ˋᐝ.ॱ(ˎ);
        }
    }

    public void onResume() {
        this.ˏˏ = false;
        super.onResume();
        this.ʾ = dgh.ॱ();
        if (this.ˏॱ != null) {
            this.ˏॱ.ˋ();
        }
    }

    public void onPause() {
        super.onPause();
        long currentTimeMillis = System.currentTimeMillis() - this.ʾ;
        String str = "1000";
        if (currentTimeMillis >= 1000) {
            est.ˋ("1000");
        }
        if (this.ˋॱ.ˋ((AppDetailActivityProtocol) ʾ())) {
            ean.ˏ(((AppDetailActivityProtocol) ʾ()).ॱ().ॱˋ(), currentTimeMillis, this.ॱˋ);
        }
        evr.ˊ().ʻ();
    }

    private String ˏˎ() {
        return this.ॱˋ + System.currentTimeMillis();
    }

    public void onStart() {
        super.onStart();
        ˊᐝ();
    }

    public void onStop() {
        super.onStop();
        ll.ˏ(ContentManager.getInstant().getContext()).ˋ(this.ˎˏ);
    }

    public boolean onOptionsItemSelected(MenuItem menuItem) {
        if (menuItem.getItemId() != 16908332) {
            return super.onOptionsItemSelected(menuItem);
        }
        finish();
        return true;
    }

    public boolean ॱˊ() {
        return this.ˏˏ;
    }

    public void ˋ(int i, int i2) {
        if (this.ˏॱ != null) {
            this.ˏॱ.ˋ(i, i2);
            if (this.ᐧ < 0) {
                this.ᐧ = epv.ˏ();
            }
            if (this.ᐧ + i == i2) {
                this.ॱͺ = true;
            } else {
                this.ॱͺ = false;
            }
        }
    }

    public void ॱ(int i, CSSStyleSheet cSSStyleSheet, String str) {
        this.ॱʻ = i;
        if (i != 1) {
            this.ॱʻ = 0;
            if (this.ᐨ) {
                ॱʻ();
                return;
            } else if (this.ॱˎ != 3) {
                return;
            } else {
                if (this.ˏॱ != null) {
                    this.ˏॱ.setBgColor(getResources().getColor(o.ewm.c.ॱˎ));
                }
            }
        }
        ॱʻ();
        ˊ(cSSStyleSheet, str);
    }

    private void ॱʻ() {
        boolean z = true;
        ˋˋ();
        if (this.ˏॱ != null && this.ˎˎ) {
            CustomActionBar customActionBar = this.ˏॱ;
            if (this.ॱʻ != 1) {
                z = false;
            }
            customActionBar.setImmerStyle(z);
            this.ˏॱ.setVisibility(0);
            this.ˏॱ.setActionbarClickListener(this);
            this.ˏॱ.setIsSecondaryList(this.ᐨ);
        }
    }

    private void ˊ(CSSStyleSheet cSSStyleSheet, String str) {
        if (cSSStyleSheet != null) {
            if (str == null) {
                this.ॱʻ = 0;
                return;
            }
            CSSRule rule = new CSSSelector(str).getRule(cSSStyleSheet.getRootRule());
            if (rule != null) {
                CSSRule rule2 = new CSSSelector(".body").getRule(rule);
                if (rule2 != null) {
                    CSSView.wrap(getWindow().getDecorView(), rule2).render(false);
                    CSSDeclaration styleDeclaration = rule2.getStyleDeclaration();
                    if (styleDeclaration != null) {
                        CSSMonoColor cSSMonoColor = (CSSMonoColor) styleDeclaration.getPropertyValue(CSSPropertyName.BACKGROUND_COLOR);
                        if (cSSMonoColor != null) {
                            this.ˋˋ = cSSMonoColor.getColor();
                        }
                    }
                }
                if (this.ˏॱ != null) {
                    CSSView.wrap(this.ˏॱ, rule).render();
                }
            }
        }
    }

    public void ˎ(int i) {
        this.ॱʻ = i;
        if (i != 1) {
            this.ॱʻ = 0;
            if (this.ॱˎ == 3) {
                if (this.ˏॱ != null) {
                    this.ˏॱ.setBgColor(getResources().getColor(o.ewm.c.ॱˎ));
                }
            } else {
                return;
            }
        }
        ˋˋ();
        if (this.ˏॱ != null && this.ˎˎ) {
            this.ˏॱ.setVisibility(0);
            this.ˏॱ.setActionbarClickListener(this);
        }
    }

    public void ᐝॱ() {
        finish();
    }

    public void ʼॱ() {
        djf.ˋ(this, this.ᐝॱ, null);
    }

    public void ˊˋ() {
        ˎˏ();
    }

    private String ˊ(AppDetailActivityProtocol appDetailActivityProtocol) {
        if (appDetailActivityProtocol.ॱ() != null) {
            return appDetailActivityProtocol.ॱ().ˋॱ();
        }
        return null;
    }

    private void ॱʽ() {
        if (this.ˏॱ == null) {
            return;
        }
        if (this.ᐨ) {
            this.ˋˋ = getResources().getColor(o.ewm.c.ॱˎ);
        } else if (this.ॱˎ == 3) {
            this.ˏॱ.setContentType(1000);
            if (this.ˋˋ == 0) {
                this.ˋˋ = getResources().getColor(o.ewm.c.ॱˎ);
            }
        } else if (this.ॱˋ == null || !this.ॱˋ.contains("substancedetail")) {
            this.ˏॱ.setContentType(1002);
            if (this.ˋˋ == 0) {
                this.ˋˋ = getResources().getColor(o.ewm.c.ॱˎ);
            }
        } else {
            this.ˏॱ.setContentType(1001);
            if (this.ˋˋ == 0) {
                this.ˋˋ = getResources().getColor(o.ewm.c.ॱˎ);
            }
        }
    }

    private boolean ˊ(drr o_drr, DetailHiddenBean detailHiddenBean) {
        return o_drr.ˋ() == null || detailHiddenBean == null || CollectCheck.isEmpty(o_drr.ʽ()) || (detailHiddenBean.ͺˏ() == null && detailHiddenBean.ॱ() == 0);
    }

    private String ˊ(DetailResponse detailResponse) {
        List ʻॱ = detailResponse.ʻॱ();
        if (CollectCheck.isEmpty(ʻॱ)) {
            return null;
        }
        return ((Layout) ʻॱ.get(0)).ˏ();
    }

    @TargetApi(23)
    public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
        if (14 == i) {
            PermissionChecker.ˎ(this, i, strArr, iArr);
        }
    }

    public void ˏ(int i, int i2) {
        if (i2 == -1) {
            AbstractBaseActivity.sendUpgrade(this);
        }
    }

    public void ˊ(SpinnerItem spinnerItem) {
    }

    public void ʼʽ() {
        ʼॱ();
    }

    public void ˋ(ShareInfo shareInfo) {
        ˊˋ();
    }

    public cia ॱ(int i) {
        return (cia) this.ˑ.get(Integer.valueOf(i));
    }

    public void ˋ(int i, cia o_cia) {
        Logger.ˎ("AppDetailActivity", "set Cache Provider:" + i);
        this.ˑ.put(Integer.valueOf(i), o_cia);
    }

    public Object T_() {
        return this.ˑ;
    }

    private void ॱʼ() {
        TaskFragment ـ = ـ();
        if (ـ != null) {
            Bundle bundle = new Bundle();
            bundle.putString(RemoteBuoyAction.REMOTE_BUOY_URI, this.ॱˋ);
            bundle.putString("trace_id", this.ᐝॱ);
            if (!ـ.ͺ()) {
                ـ.ʼ(bundle);
            }
            ـ.ॱˋ(false);
            ـ.ʾˋ();
        } else if (this.ͺॱ != null && this.ͺॱ.isShowing()) {
            this.ͺॱ.dismiss();
        }
    }

    private void ॱͺ() {
        if (ActivityUtil.isAcitivtyNotValid(this)) {
            Logger.ˎ("AppDetailActivity", "the current activity is destroyed");
            return;
        }
        if (this.ͺॱ == null) {
            this.ͺॱ = new ProgressDialog(this);
        }
        this.ͺॱ.setCancelable(true);
        this.ͺॱ.setCanceledOnTouchOutside(false);
        this.ͺॱ.setMessage(getString(n.ˊߴ));
        this.ͺॱ.setOnCancelListener(new OnCancelListener(this) {
            final /* synthetic */ AppDetailActivity ॱ;

            {
                this.ॱ = r1;
            }

            public void onCancel(DialogInterface dialogInterface) {
                TaskFragment ˊ = this.ॱ.ـ();
                if (ˊ != null) {
                    ˊ.ʾᐝ();
                }
            }
        });
        this.ͺॱ.show();
        ayw.ˊ(this.ͺॱ.getWindow());
    }

    private TaskFragment ـ() {
        List ˏ = ˏॱ().ˏ();
        TaskFragment taskFragment = null;
        int size = ˏ.size() - 1;
        while (size >= 0) {
            TaskFragment taskFragment2;
            Fragment fragment = (Fragment) ˏ.get(size);
            if (fragment instanceof TaskFragment) {
                taskFragment2 = (TaskFragment) fragment;
            } else {
                taskFragment2 = taskFragment;
            }
            size--;
            taskFragment = taskFragment2;
        }
        return taskFragment;
    }

    public void ˋ(bzh o_bzh) {
        this.ॱʼ = o_bzh;
    }

    public bzh ˊˊ() {
        return this.ॱʼ;
    }

    public String ˋˊ() {
        return this.ॱʽ;
    }

    public void ˎ(String str, BaseCardBean baseCardBean, int i) {
        if (this.ㆍ == null) {
            this.ㆍ = new InteractiveRecommListenerImpl();
        }
        this.ˊॱ = str;
        this.ㆍ.ˎ(str, baseCardBean, i);
    }

    public int ˉ() {
        if (this.ॱˎ != 3 || this.ॱͺ) {
            return 0;
        }
        return getResources().getDimensionPixelOffset(o.ewm.d.ˋˋ);
    }

    public void ˋ(View view, int i) {
        if (this.ㆍ != null) {
            this.ㆍ.ˋ(view, i);
        }
    }

    public void ॱ(String str, cia o_cia, cvt o_cvt) {
        if (this.ㆍ != null) {
            this.ㆍ.ॱ(str, o_cia, o_cvt);
        }
    }

    public void onAccountBusinessResult(ccp o_ccp) {
        if (!this.ᐝˊ) {
            return;
        }
        if (102 == o_ccp.ˎ || 103 == o_ccp.ˎ) {
            Logger.ˎ("AppDetailActivity", "van attend activity, start to refresh");
            this.ꜟ.post(new d());
        }
    }

    public void finish() {
        super.finish();
        ᐨ();
    }

    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (i == 4 && (evr.ˊ().ˎ() == null || evr.ˊ().ˎ().ʽॱ())) {
            ᐨ();
        }
        return super.onKeyDown(i, keyEvent);
    }

    private void ᐨ() {
        if (!this.ꜞ) {
            this.ꜞ = true;
            if (eqp.ᐝ() && dgm.ˎ((Activity) this) == 0) {
                cvt ˊ = ebi.ˊ().ˊ(this.ॱˋ, this.ˊॱ);
                if (ˊ != null) {
                    ebg.ॱ().ˏ(ˊ.ˊ(), ˊ);
                }
            }
        }
    }
}
